package com.pencilisland.pay.api.service;

import com.pencilisland.pay.api.bean.wxpay.WxLoginResp;
import com.pencilisland.pay.api.bean.wxpay.WxpayAppSubmitReq;
import com.pencilisland.pay.api.bean.wxpay.WxpayCloseOrderReq;
import com.pencilisland.pay.api.bean.wxpay.WxpayOrderReq;
import com.pencilisland.pay.api.bean.wxpay.WxpaySubmitReq;

/**
 * 微信支付服务
 * 
 * @author Breeze
 *
 */
public interface WxpayService {

	/**
	 * 统一下单
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	WxpaySubmitReq order(WxpayOrderReq request) throws Exception;

	/**
	 * 关闭订单
	 * 
	 * @param request
	 * @return
	 * @throws Exception
	 */
	WxpayAppSubmitReq closeOrder(WxpayCloseOrderReq request) throws Exception;
	
	/**
	 * 微信登录
	 * @param code
	 * @return
	 * @throws Exception
	 */
	WxLoginResp login(String code)throws Exception;

}